{block name="style"}
{/block}
{block name="content"}
<form class="layui-form" action="{:url('/wms/recv/order_recv')}" method="post" id="order-recv">
    <input type="hidden" name="order_id" value="{$order.order_id}">
    <div class="info-header">
        <div class="layui-row">
            <div class="layui-col-xs3">
                <label class="layui-form-label">内部单号</label>
                <div class="layui-input-block">
                    <input type="text" value="{$order.order_sn}" readonly class="layui-input copy-text">
                </div>
            </div>
            <div class="layui-col-xs3">
                <label class="layui-form-label">平台单号</label>
                <div class="layui-input-block">
                    <input type="text" value="{$order.order_no}" readonly class="layui-input copy-text">
                </div>
            </div>
            <div class="layui-col-xs3">
                <label class="layui-form-label">销售账号</label>
                <div class="layui-input-block">
                    <input type="text" value="{$order.account.username}" readonly class="layui-input">
                </div>
            </div>
            <div class="layui-col-xs3">
                <label class="layui-form-label">购买用户</label>
                <div class="layui-input-block">
                    {php}$buyer = \app\common\model\Orders::getBuyerName($order);{/php}
                    <input type="text" value="{$buyer}" readonly class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-xs3">
                <label class="layui-form-label">追踪号</label>
                <div class="layui-input-block">
                    <input type="text" value="{$order.ren?$order.ren.track_num:''}" readonly class="layui-input copy-text">
                </div>
            </div>
            <div class="layui-col-xs3">
                <label class="layui-form-label">下单日期</label>
                <div class="layui-input-block">
                    <input type="text" value="{$order.order_source_create_time}" readonly class="layui-input">
                </div>
            </div>
            <div class="layui-col-xs3">
                <label class="layui-form-label">发货日期</label>
                <div class="layui-input-block">
                    <input type="text" value="{$order.shipping_time}" readonly class="layui-input">
                </div>
            </div>
        </div>
    </div>
    <div class="info-body">
        <div class="layui-row" style="margin-top: 30px;">
            <h2>商品详情</h2>
            <table class="layui-table text-center">
                <thead>
                <tr>
                    <th>图片</th>
                    <th>产品名称</th>
                    <th>SKU</th>
                    <th>购买数量</th>
                    <th>退货数量</th>
                    <th>商品线上链接</th>
                    <th>单价</th>
                    <th>备注</th>
                </tr>
                </thead>
                <tbody>
                {foreach $order->detail as $detail}
                <tr>
                    <td width="100"><img src="{$detail.image_url}"></td>
                    <td class="text-left">{$detail.name_ch}</td>
                    <td>
                        <span class="copy-text">{$detail.sku}</span>
                        <input type="hidden" name="sku[]" value="{$detail.sku}">
                    </td>
                    <td>
                        {$detail.qty}
                        <input type="hidden" name="qty[]" value="{$detail.return_qty}">
                    </td>
                    <td>
                        {$detail->return_qty}
                        <input type="hidden" name="return_qty[]" value="{$detail.return_qty}">
                    </td>
                    <td>
                        {if !empty($detail.url)}
                        <a target="_blank" href="{$detail.url}"><i class="layui-icon layui-icon-link"></i></a>
                        {/if}
                    </td>
                    <td>{$detail.price|abs}</td>
                    <td>{$detail.remark}</td>
                </tr>
                {/foreach}
                </tbody>
            </table>
        </div>
    </div>
</form>
{/block}
{block name="script"}
{/block}